package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/18 10:36
 * 邮箱：648859026@qq.com
 */
public class ConfigAction extends AHttpService<PbBean.PbResSystemGetConfig>{
    /**
     * 获取基础配置信息
     * @param context
     * @return
     */
    public static ConfigAction newInstance(Context context){
        return new ConfigAction(context);
    }
    private ConfigAction(Context context) {
        super(context);
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqSystemGetConfig.Builder builder = PbBean.PbReqSystemGetConfig.newBuilder();
        builder.setBaseClientInfo(baseBuilder);

        return apiService.getConfig(builder.build());
    }
}
